# Contributor: David Demelier <markand@malikania.fr>
# Maintainer: David Demelier <markand@malikania.fr>
pkgname=libretro-blastem
pkgver=0_git20210810
pkgrel=0
_commit="0786858437ed71996f43b7af0fbe627eb88152fc"
pkgdesc="fast and accurate Genesis emulator"
url="https://github.com/libretro/blastem"
arch="all !aarch64 !armv7 !armhf !x86 !riscv64"
license="GPL-3.0-only"
makedepends="mesa-dev zlib-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/libretro/blastem/archive/$_commit.tar.gz
	patch-unbundle.patch
	"
builddir="$srcdir/blastem-$_commit"
options="!check" # No tests

build() {
	rm -rf zlib
	make -f Makefile.libretro HOST_ZLIB=1
}

package() {
	install -Dm644 "$builddir"/blastem_libretro.so "$pkgdir"/usr/lib/libretro/blastem_libretro.so
}

sha512sums="
ff11a2ec56c5f174e471313c24287156d1182d54ba7abd2f9fda78347434ed65fc1b0622c60d63bcfd7db49a0a8287939570b9f7df2c59f94e5f66fdf2ffd63d  libretro-blastem-0786858437ed71996f43b7af0fbe627eb88152fc.tar.gz
0ffdbdb9aadc147e971589b162c444ecffa72b297351538ab5546b28088e7e345d61268f9feb143f5620202c6dad4bc4ac5b1ffcd330c99aa8b54065f09cb960  patch-unbundle.patch
"
